:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --background-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --error-color: #ea4335;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 15px;
    width: 100%;
    height: 100vh;
}

.container {
    max-width: 100%;
    height: calc(100vh - 30px);
    box-sizing: border-box;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}
h4{
    min-width: 200px;
}
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: #3367d6;
}

.btn:not(.primary) {
    background-color: #f1f1f1;
    color: var(--text-color);
}

.btn:not(.primary):hover {
    background-color: #e0e0e0;
}

.status {
    margin-left: auto;
    padding: 8px 12px;
    border-radius: 4px;
    background-color: #f8f8f8;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

.tree-container {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    background-color: #f9f9f9;
    min-height: 500px;
    height: calc(100vh - 200px);
    overflow: auto;
    position: relative;
}

.node {
    margin-left: 20px;
    padding: 8px;
    border-left: 1px solid #e0e0e0;
}

.node-header {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
}

.node-header:hover {
    background-color: #f5f5f5;
}

.node-header::before {
    content: '▶';
    margin-right: 5px;
    font-size: 10px;
    transition: transform 0.2s;
}

.node-header.expanded::before {
    transform: rotate(90deg);
}

.node-content {
    margin-top: 5px;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.node-content.visible {
    display: block;
}

.node-title {
    font-weight: bold;
    color: var(--primary-color);
}

.node-info {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 700px;
}

.info-item {
    background-color: #e8f0fe;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.clickable {
    background-color: #e6f4ea;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
/* 添加新按钮样式 */
.btn.success {
    background-color: var(--success-color);
    color: white;
}

.btn.success:hover {
    background-color: #2e7d32;
}

.btn.warning {
    background-color: var(--warning-color);
    color: white;
}

.btn.warning:hover {
    background-color: #c62828;
}

/* 添加颜色变量 */
:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --success-color: #4caf50;
    --warning-color: #f44336;
    /* 其他变量保持不变... */
}

/* 优化节点样式 */
.node-header {
    transition: background-color 0.2s;
}

.node-header:hover {
    background-color: #e8f0fe;
}

/* 添加深度指示线 */
.node {
    position: relative;
}

.node::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    border-left: 1px dashed #e0e0e0;
}

/* 优化加载动画 */
.spinner {
    border: 4px solid rgba(66, 133, 244, 0.1);
    border-top: 4px solid var(--primary-color);
    width: 50px;
    height: 50px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* 截图按钮样式 */
.btn.small {
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
}

/* 截图预览样式 */
.screenshot-preview {
    margin-top: 10px;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
    display: inline-block;
}

.screenshot-preview img {
    max-width: 200px;
    max-height: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.screenshot-preview img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 截图模态框 */
.screenshot-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.screenshot-modal img {
    max-width: 90%;
    max-height: 90%;
    border: 2px solid white;
    border-radius: 8px;
}

.screenshot-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
/* 截图按钮样式 */
.screenshot-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.7);
}

.screenshot-btn:hover {
    background-color: #4CAF50;
    color: white;
}

/* 节点信息样式 */
.info-item {
    background-color: #e8f0fe;
    padding: 5px 8px;
    border-radius: 4px;
    margin: 3px 0;
    font-size: 13px;
}

/* 截图预览容器 */
.screenshot-preview {
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
    text-align: center;
}

.screenshot-preview img {
    max-width: 200px;
    max-height: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.screenshot-preview img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

